/**
 * Created with JetBrains PhpStorm.
 * User: Adam
 * Date: 13-10-16
 * Time: 20:58
 * To change this template use File | Settings | File Templates.
 */

//Taken from: http://www.w3schools.com/js/js_cookies.asp
function toggleCookie(c_name, value, exdays)
{
    var exdate = new Date();
    exdate.setDate(exdate.getDate() + exdays);
    var c_value = escape(value) + ((exdays == null) ? "" : "; expires=" + exdate.toUTCString());
    document.cookie = c_name + "=" + c_value;
}
